package com.vitabuybuy.tv.dto;

import com.vitabuybuy.tv.utils.LanaugeUtils;

import java.util.List;

/**
 * 作者：SimGa
 * 日期：2021/1/6
 * 时间：14:48
 * 包名：com.vitabuybuy.tv.dto
 */
public class GroupBuyDetailDto {
    private int gainQuantity;
    /**
     * images : http://106.55.47.138/attachment/jpg/4066/760_16486.jpg;http://106.55.47.138/attachment/jpg/8300/761_20720.jpg;http://106.55.47.138/attachment/jpg/6545/762_28181.jpg
     * originalPrice : 150.0
     * salePrice : 100.0
     * promotionPrice : 20.0
     * attributeList : [{"valueList":[{"id":153,"text":"{\"EN\":\"grey\",\"CN\":\"灰色\",\"MA\":\"grey\"}"},{"id":154,"text":"{\"EN\":\"orange\",\"CN\":\"橙色\",\"MA\":\"orange\"}"},{"id":155,"text":"{\"EN\":\"coffee\",\"CN\":\"咖啡色\",\"MA\":\"coffee\"}"},{"id":173,"text":"{\"EN\":\"yellow\",\"CN\":\"黄色\",\"MA\":\"yellow\"}"},{"id":174,"text":"{\"EN\":\"green\",\"CN\":\"绿色\",\"MA\":\"green\"}"}],"name":"{\"EN\":\"color\",\"CN\":\"颜色\",\"MA\":\"color\"}","ordinary":false,"id":81,"type":"text"}]
     * goodsList : [{"image":"http://106.55.47.138/attachment/jpg/1228/1513_13780.jpg","code":"153","originalPrice":150,"salePrice":100,"id":273,"specifications":"{\"EN\":\"orange\",\"CN\":\"橙色\",\"MA\":\"orange\"}","stocks":31},{"image":"http://106.55.47.138/attachment/jpg/4473/1514_17025.jpg","code":"154","originalPrice":150,"salePrice":100,"id":274,"specifications":"{\"EN\":\"白色\",\"CN\":\"白色\",\"MA\":\"白色\"}","stocks":42},{"image":"http://106.55.47.138/attachment/jpg/3370/1515_25138.jpg","code":"155","originalPrice":150,"salePrice":100,"id":275,"specifications":"{\"EN\":\"black flower\",\"CN\":\"黑色印花\",\"MA\":\"black flower\"}","stocks":37},{"image":"http://106.55.47.138/attachment/jpg/612/1517_8814.jpg","code":"174","originalPrice":150,"salePrice":100,"id":277,"specifications":"{\"EN\":\"blue\",\"CN\":\"蓝色\",\"MA\":\"blue\"}","stocks":40},{"image":"http://106.55.47.138/attachment/jpg/390/1516_31374.jpg","code":"173","originalPrice":150,"salePrice":100,"id":276,"specifications":"{\"EN\":\"38\",\"CN\":\"38\",\"MA\":\"38\"}","stocks":40}]
     * description : <p>哈哈啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊<img src="http://106.55.47.138/attachment/jpg/8912/1077_9422.jpg"></p>
     * store : {"productQuantity":7,"name":"李艺科潮男装卖店","logo":"http://106.55.47.138/attachment/jpg/4052/793_15950.jpg","id":12}
     * labelList : []
     * salesQuantity : 97
     * name : {"EN":"nikedunk","CN":"nikedunk","MA":"nikedunk"}
     * id : 61
     * region : {"name":"{\"EN\":\"Guangzhou\",\"CN\":\"广州\",\"MA\":\"Guangzhou\"}","id":267}
     * brand : {"name":"nike","id":1}
     */

    private GoodsDetailsDto product;
    private String type;
    private boolean enabled;
    private int purchasingGroupQuantity;
    private int limitQuantity;
    private int memberLimit;
    private long remainingTime;
    private int totalQuantity;
    private String createTime;
    private int salesQuantity;
    private String startTime;
    private int id;
    private String endTime;
    private String description;
    private GoodsDetailsDto.RegionBean region;

    /**
     * name : 男士机械表
     * id : 108
     */

    private GoodsDetailsDto.StoreBean store;
    private CategoryBean category;
    private String status;
    private List<?> goodsList;


    public int getPurchasingGroupQuantity() {
        return purchasingGroupQuantity;
    }

    public void setPurchasingGroupQuantity(int purchasingGroupQuantity) {
        this.purchasingGroupQuantity = purchasingGroupQuantity;
    }

    public GoodsDetailsDto.StoreBean getStore() {
        return store;
    }

    public void setStore(GoodsDetailsDto.StoreBean store) {
        this.store = store;
    }

    public GoodsDetailsDto.RegionBean getRegion() {
        return region;
    }

    public void setRegion(GoodsDetailsDto.RegionBean region) {
        this.region = region;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getGainQuantity() {
        return gainQuantity;
    }

    public void setGainQuantity(int gainQuantity) {
        this.gainQuantity = gainQuantity;
    }

    public GoodsDetailsDto getProduct() {
        return product;
    }

    public void setProduct(GoodsDetailsDto product) {
        this.product = product;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public int getLimitQuantity() {
        return limitQuantity;
    }

    public void setLimitQuantity(int limitQuantity) {
        this.limitQuantity = limitQuantity;
    }

    public int getMemberLimit() {
        return memberLimit;
    }

    public void setMemberLimit(int memberLimit) {
        this.memberLimit = memberLimit;
    }

    public long getRemainingTime() {
        return remainingTime;
    }

    public void setRemainingTime(long remainingTime) {
        this.remainingTime = remainingTime;
    }

    public int getTotalQuantity() {
        return totalQuantity;
    }

    public void setTotalQuantity(int totalQuantity) {
        this.totalQuantity = totalQuantity;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public int getSalesQuantity() {
        return salesQuantity;
    }

    public void setSalesQuantity(int salesQuantity) {
        this.salesQuantity = salesQuantity;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public CategoryBean getCategory() {
        return category;
    }

    public void setCategory(CategoryBean category) {
        this.category = category;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public List<?> getGoodsList() {
        return goodsList;
    }

    public void setGoodsList(List<?> goodsList) {
        this.goodsList = goodsList;
    }

    public static class ProductBean {
        private String images;
        private double originalPrice;
        private double salePrice;
        private double promotionPrice;
        private String description;
        /**
         * productQuantity : 7
         * name : 李艺科潮男装卖店
         * logo : http://106.55.47.138/attachment/jpg/4052/793_15950.jpg
         * id : 12
         */

        private StoreBean store;
        private int salesQuantity;
        private String name;
        private int id;
        /**
         * name : {"EN":"Guangzhou","CN":"广州","MA":"Guangzhou"}
         * id : 267
         */

        private RegionBean region;
        /**
         * name : nike
         * id : 1
         */

        private BrandBean brand;
        /**
         * valueList : [{"id":153,"text":"{\"EN\":\"grey\",\"CN\":\"灰色\",\"MA\":\"grey\"}"},{"id":154,"text":"{\"EN\":\"orange\",\"CN\":\"橙色\",\"MA\":\"orange\"}"},{"id":155,"text":"{\"EN\":\"coffee\",\"CN\":\"咖啡色\",\"MA\":\"coffee\"}"},{"id":173,"text":"{\"EN\":\"yellow\",\"CN\":\"黄色\",\"MA\":\"yellow\"}"},{"id":174,"text":"{\"EN\":\"green\",\"CN\":\"绿色\",\"MA\":\"green\"}"}]
         * name : {"EN":"color","CN":"颜色","MA":"color"}
         * ordinary : false
         * id : 81
         * type : text
         */

        private List<GoodsDetailsDto.AttributeListBean> attributeList;
        /**
         * image : http://106.55.47.138/attachment/jpg/1228/1513_13780.jpg
         * code : 153
         * originalPrice : 150.0
         * salePrice : 100.0
         * id : 273
         * specifications : {"EN":"orange","CN":"橙色","MA":"orange"}
         * stocks : 31
         */

        private List<GoodsDetailsDto.GoodsListBean> goodsList;
        private List<?> labelList;

        public String getImages() {
            return images;
        }

        public void setImages(String images) {
            this.images = images;
        }

        public double getOriginalPrice() {
            return originalPrice;
        }

        public void setOriginalPrice(double originalPrice) {
            this.originalPrice = originalPrice;
        }

        public double getSalePrice() {
            return salePrice;
        }

        public void setSalePrice(double salePrice) {
            this.salePrice = salePrice;
        }

        public double getPromotionPrice() {
            return promotionPrice;
        }

        public void setPromotionPrice(double promotionPrice) {
            this.promotionPrice = promotionPrice;
        }

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }

        public StoreBean getStore() {
            return store;
        }

        public void setStore(StoreBean store) {
            this.store = store;
        }

        public int getSalesQuantity() {
            return salesQuantity;
        }

        public void setSalesQuantity(int salesQuantity) {
            this.salesQuantity = salesQuantity;
        }

        public String getName() {
       return LanaugeUtils.returnStrByLocation(name);
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public RegionBean getRegion() {
            return region;
        }

        public void setRegion(RegionBean region) {
            this.region = region;
        }

        public BrandBean getBrand() {
            return brand;
        }

        public void setBrand(BrandBean brand) {
            this.brand = brand;
        }

        public List<GoodsDetailsDto.AttributeListBean> getAttributeList() {
            return attributeList;
        }

        public void setAttributeList(List<GoodsDetailsDto.AttributeListBean> attributeList) {
            this.attributeList = attributeList;
        }

        public List<GoodsDetailsDto.GoodsListBean> getGoodsList() {
            return goodsList;
        }

        public void setGoodsList(List<GoodsDetailsDto.GoodsListBean> goodsList) {
            this.goodsList = goodsList;
        }

        public List<?> getLabelList() {
            return labelList;
        }

        public void setLabelList(List<?> labelList) {
            this.labelList = labelList;
        }

        public static class StoreBean {
            private int productQuantity;
            private String name;
            private String logo;
            private int id;

            public int getProductQuantity() {
                return productQuantity;
            }

            public void setProductQuantity(int productQuantity) {
                this.productQuantity = productQuantity;
            }

            public String getName() {
                return LanaugeUtils.returnStrByLocation(name);
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getLogo() {
                return logo;
            }

            public void setLogo(String logo) {
                this.logo = logo;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }
        }

        public static class RegionBean {
            private String name;
            private int id;

            public String getName() {
                return LanaugeUtils.returnStrByLocation(name);
            }

            public void setName(String name) {
                this.name = name;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }
        }

        public static class BrandBean {
            private String name;
            private int id;

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }
        }

        public static class AttributeListBean {
            private String name;
            private boolean ordinary;
            private int id;
            private String type;
            /**
             * id : 153
             * text : {"EN":"grey","CN":"灰色","MA":"grey"}
             */

            private List<ValueListBean> valueList;

            public String getName() {
                return LanaugeUtils.returnStrByLocation(name);
            }

            public void setName(String name) {
                this.name = name;
            }

            public boolean isOrdinary() {
                return ordinary;
            }

            public void setOrdinary(boolean ordinary) {
                this.ordinary = ordinary;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getType() {
                return type;
            }

            public void setType(String type) {
                this.type = type;
            }

            public List<ValueListBean> getValueList() {
                return valueList;
            }

            public void setValueList(List<ValueListBean> valueList) {
                this.valueList = valueList;
            }

            public static class ValueListBean {
                private int id;
                private String text;

                public int getId() {
                    return id;
                }

                public void setId(int id) {
                    this.id = id;
                }

                public String getText() {
                    return LanaugeUtils.returnStrByLocation(text);
                }

                public void setText(String text) {
                    this.text = text;
                }
            }
        }

        public static class GoodsListBean {
            private String image;
            private String code;
            private double originalPrice;
            private double salePrice;
            private int id;
            private String specifications;
            private int stocks;

            public String getImage() {
                return image;
            }

            public void setImage(String image) {
                this.image = image;
            }

            public String getCode() {
                return code;
            }

            public void setCode(String code) {
                this.code = code;
            }

            public double getOriginalPrice() {
                return originalPrice;
            }

            public void setOriginalPrice(double originalPrice) {
                this.originalPrice = originalPrice;
            }

            public double getSalePrice() {
                return salePrice;
            }

            public void setSalePrice(double salePrice) {
                this.salePrice = salePrice;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getSpecifications() {
                String[] split = specifications.split(";");
                specifications = "";
                for (String spec : split) {
                    String str = LanaugeUtils.returnStrByLocation(spec);
                    specifications = specifications.concat(str).concat(";");
                }
                return specifications.isEmpty() ? specifications : specifications.substring(0, specifications.length() - 1);

            }

            public void setSpecifications(String specifications) {
                this.specifications = specifications;
            }

            public int getStocks() {
                return stocks;
            }

            public void setStocks(int stocks) {
                this.stocks = stocks;
            }
        }
    }

    public static class CategoryBean {
        private String name;
        private int id;

        public String getName() {
            return LanaugeUtils.returnStrByLocation(name);
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }
    }
    public static class RegionBean {
        private String name = "";
        private int id;

        public String getName() {
            return LanaugeUtils.returnStrByLocation(name);
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }
    }
}
